#include <stdio.h>

// 这道题的题目条件给的很模糊——什么叫做大致？
// 根据网上一些资料参考，实际上题目的逻辑
// 非0元素个数占比小于0.05或个数等于行或列满足一个即可

int main() {
    int row, column;
    scanf("%d%d", &row, &column);
    int nonZeroCnt = 0;
    int totalNumCnt = row * column;
    for (int i = 0; i < row; i++) {
        for (int j = 0; j < column; j++) {
            int curr; scanf("%d", &curr);
            nonZeroCnt += curr == 0 ? 0 : 1;
        }
    }
    if ((double)nonZeroCnt / (double)totalNumCnt <= 0.05 ||
    nonZeroCnt == column || nonZeroCnt == row) {
        printf("Yes");
    }
    else { printf("No"); }
    return 0;
}